﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace CenterDateAchieve.Helper
{
    public class DataGridViewHelper
    {
        public static void DataGridReadOnly(DataGridView gird, string ColName)
        {
            gird.ReadOnly = false;

            foreach (DataGridViewColumn col in gird.Columns)
            {
                if (col.Name != ColName)
                    col.ReadOnly = true;
            }
        }
    }
}
